package com.bjbn.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.bjbn.entity.EqptMapping;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface EqptMappingMapper extends BaseMapper<EqptMapping> {
    /**
     * 根据设备编码查询资产编码
     */
    @Select("SELECT * FROM eqpt_mapping WHERE eqpt_code = #{eqptCode} LIMIT 1")
    EqptMapping selectByEqptCode(String eqptCode);
    
    /**
     * 根据BMS编码查询资产编码
     */
    @Select("SELECT * FROM eqpt_mapping WHERE bms_code = #{bmsCode} LIMIT 1")
    EqptMapping selectByBmsCode(String bmsCode);
} 